49ae8b
@@ -290,6 +290,8 @@
public void setConf(Configuration conf) {
       if (propsChanged) {
         if (pmf != null){
           clearOutPmfClassLoaderCache(pmf);
+          // close the underlying connection pool to avoid leaks
+          pmf.close();
         }
         pmf = null;
         prop = null;
